import reshandler from 'services/response-handler'
/*
 * 更新收货地址
 */
function makeData(response) {
  return Object.assign({}, response, {
    receivers: response.receivers || []
  })
}
export default function (params, success, fail) {
  // request 
  params = Object.assign({}, params, {
    methodName: "UpdateReceiver",
  })

  // invoke
  this.$.get(params)
    .then(reshandler.success(success, fail, makeData), reshandler.error(fail))
}
